package com.xmb.common.remote.service;

import com.xmb.common.remote.entity.OrderCallBackParam;
import com.xmb.common.remote.entity.ProductOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created by lyndon on 2019/4/23.
 */
@FeignClient(value = "shop-api")
public interface ShopService {

    /**
     * 通过id查询商品订单
     */
    @GetMapping("/shop/order/get/{id}")
    ProductOrder getProductOrderOne(@PathVariable(name = "id") Long id);


    /**
     * 订单状态变化回调
     */
    @PostMapping("/shop/order/callback")
    void orderCallback(@RequestBody OrderCallBackParam orderCallBackParam);
}
